<?php $sessionUser = new Zend_Session_Namespace('sessionUser'); ?>
<h2>First, Select a Patient</h2>
Search a Patient:
<?php
    echo $this->form ;
	date_default_timezone_set('UTC');
    $date = date("Y-m-d"); //Date du jour
?>

<table>
    <tr>
    	<th>Id</th>
        <th>Name</th>
        <th>Type</th>
        <th>Schedule?</th>

    </tr>
    <?php foreach ($this->allpatients as $a) : ?>
        
        <tr>
           <td><?php echo $this->escape($a->PatientId); ?> </td>  
           <td><?php echo $this->escape($a->LName); ?> <?php echo $this->escape($a->FName);?> </td>
           <td><?php echo $this->escape($a->PatientType); ?></td>
           <td><a style="color:black;" href="<?php echo $this->url(array('controller' => 'appointment',
                           'action' => 'doctorappointment', 'patientid' => $a->PatientId, 'date'=>$date)); ?>">Schedule</a></td>

        </tr>                                        
    <?php  endforeach; ?>
</table>